﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DusonFramework.Documents.Office.Excel.Linq
{
    using LinqToExcel;

    public class Example
    {
        class Data
        {
            public string Title { get; set; }
            public string Content { get; set; }
        }

        public void Test1()
        {
            var excel = new ExcelQueryFactory("Excel路径");
            excel.AddMapping<Data>(x => x.Title, "标题");
            excel.AddMapping<Data>(x => x.Content, "内容");
            var bankruptCompanies = from c in excel.Worksheet<Data>(0) 
                                    select c;
        }
    }
}
